<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                template="/WEB-INF/template/menu-template.xhtml">s

    <ui:define name="metadata">
        <f:metadata>
            <f:viewParam name="id" value="#{userBean.id}"/>
            <f:viewAction action="#{userBean.initUser()}"/>
        </f:metadata>
    </ui:define>

    <ui:define name="content">

        <div class="registerForm">
            <h:form>
                <div class="label-col"><h:outputText value='Username: '/></div>
                <div class="tooltip-text"><h:inputText value='#{userBean.user.username}'/></div><br/>
                <div class="label-col"><h:outputText value='Password: '/></div>
                <div class="tooltip-text"><h:inputSecret value='#{userBean.user.password}'/></div><br/>
                <div class="label-col"><h:outputText value='First Name: '/></div>
                <div class="tooltip-text"><h:inputText value='#{userBean.user.firstName}'/></div><br/>
                <div class="label-col"><h:outputText value='Last name: '/></div>
                <div class="tooltip-text"><h:inputText value='#{userBean.user.lastName}'/></div><br/>
                <h:commandButton action="#{userBean.createUser()}" value="Create User" rendered="#{userBean.id == null}" />
                <h:commandButton action="#{userBean.updateUser()}" value="Update User" rendered="#{userBean.id != null}" />
            </h:form>
        </div>
    </ui:define>
</ui:composition>